package pers.mine.po;

import java.util.Date;

import javax.validation.constraints.Min;

import org.springframework.format.annotation.DateTimeFormat;

public class GoodsItem {
	/**
	 * @param id
	 */
	public GoodsItem(Integer id) {
		super();
		this.id = id;
	}

	public GoodsItem() {
	}

	@Min(value = 0, message = "最小不过0")
	private Integer id;

	private String name;

	private String img;

	@Min(value = 0, message = "最小不过0")
	private Double price;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date shelveDate;

	private String type;

	private String origin;

	private String brand;

	private String msg;

	private String desc;

	@Min(value = 0, message = "最小不过0")
	private Integer num;

	private Integer state;

	private Integer sale;// 销量字段,后续添加,统计得出

	private Double grade;// 评价分数字段,后续添加,统计得出

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Date getShelveDate() {
		return shelveDate;
	}

	public void setShelveDate(Date shelveDate) {
		this.shelveDate = shelveDate;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getOrigin() {
		return origin;
	}

	public void setOrigin(String origin) {
		this.origin = origin;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getSale() {
		return sale;
	}

	public void setSale(Integer sale) {
		this.sale = sale;
	}

	@Override
	public String toString() {
		return "GoodsItem [id=" + id + ", name=" + name + ", img=" + img
				+ ", price=" + price + ", shelveDate=" + shelveDate + ", type="
				+ type + ", origin=" + origin + ", brand=" + brand + ", msg="
				+ msg + ", desc=" + desc + ", num=" + num + ", state=" + state
				+ "]";
	}

	public Double getGrade() {
		return grade;
	}

	public void setGrade(Double grade) {
		this.grade = grade;
	}

}